﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Speech.Synthesis;

namespace simWaifu
{
    public partial class FormSelectVoice : Form
    {
        public FormSelectVoice()
        {
            InitializeComponent();
        }

        private void FormSelectVoice_Load(object sender, EventArgs e)
        {
            foreach (InstalledVoice voice in SpeechHandler.speak.GetInstalledVoices())
            {
                listBox1.Items.Add(voice.VoiceInfo.Description);
            }
                
        }

        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            SpeechHandler.SetVoice(listBox1.SelectedItem.ToString());
            SpeechHandler.Say("New Voice Activated.");
        }
    }
}
